package Exams.MeituanPack.q2021.q01_Username;

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        var reader = new BufferedReader(new InputStreamReader(System.in));
        var writer = new BufferedWriter(new OutputStreamWriter(System.out));

        int t = Integer.parseInt(reader.readLine());
        while (t-- != 0) {
            char[] s = reader.readLine().toCharArray();

            int n = s.length;
            boolean flag = false;

            for (int i = 0; i < n; i++) {
                char c = s[i];

                boolean isLetter = (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
                boolean isDigit = c >= '0' && c <= '9';

                if (i == 0 && !isLetter) break;
                if (i != 0 && isDigit) flag = true;
                if (i != 0 && !isLetter && !isDigit) {
                    flag = false;
                    break;
                }
            }

            if (flag) {
                writer.write("Accept\n");
            }
            else {
                writer.write("Wrong\n");
            }
        }

        writer.flush();
        reader.close();
        writer.close();
    }

}
